<style type="text/css">
.page a{
  border: 1px solid #009E94;
  padding: 10px 20px;
  margin: 0 2px;
}
.current{
  background: #009E94;
  color: #fff;
  padding: 10px 20px;
  margin: 0 2px;
  border: 1px solid #009E94;
}
.page{
  margin-top: 30px;
}

</style>
<div class="main layui-clear">
  <div class="wrap">
    <div class="content" style="margin-right:0">
      <div class="fly-tab">
        <div class="layui-tab layui-tab-brief">
          <ul class="layui-tab-title">
            <li class="<?php if(ACTION_NAME=='index'){echo 'layui-this';} ?>">
              <a href="{:U('Home/index/index')}">
                首页
              </a>
            </li>
            <li class="<?php if(ACTION_NAME=='all'){echo 'layui-this';} ?>">
              <a href="{:U('Home/index/all')}">
                全部帖
              </a>
            </li>
            <li class="<?php if(ACTION_NAME=='unsolve'){echo 'layui-this';} ?>">
              <a href="{:U('Home/index/unsolve')}">
                未结帖
              </a>
            </li>
            <li class="<?php if(ACTION_NAME=='solve'){echo 'layui-this';} ?>">
              <a href="{:U('Home/index/solve')}">
                已采纳
              </a>
            </li>
            <li class="<?php if(ACTION_NAME=='wonder'){echo 'layui-this';} ?>">
              <a href="{:U('Home/index/wonder')}">
                精华帖
              </a>
            </li>
            <?php if(isset($_SESSION['uid'])): ?>
              <li class="<?php if(ACTION_NAME=='myquestion'){echo 'layui-this';} ?>">
                <a href="{:U('Home/index/myquestion')}">
                  我的帖
                </a>
              </li>
            <?php endif; ?>
          </ul>
        </div>
        <i class="layui-icon fly-search">
          &#xe615;
        </i>
      </div>
      <ul class="fly-panel fly-list">
        <?php foreach ($top as $v) :?>
           <li class="fly-list-li">
              <a href="{:U('home/userCenter/center',array('id'=>$v['uid']))}" class="fly-list-avatar">
                  <img src="<?php echo '__ROOT__/'.$v['face'] ?>" alt="<?php echo $v['nickname']; ?>">
              </a>
              <h2 class="fly-tip">
                <a href="{:U('home/discuss/index',array('qid'=>$v['qid']))}">
                    <?php echo $v['title']; ?>
                </a>
                <span class="fly-tip-stick">
                  置顶
                </span>
              </h2>
              <p>
                <span>
                  <a href="{:U('home/userCenter/center',array('id'=>$v['uid']))}">
                    <?php echo $v['nickname']; ?>
                  </a>
                </span>
                <span>
                  <?php echo Ctime($v['create_time']); ?>
                </span>
                <span>
                  <?php echo $v['cname']; ?>
                </span>
                <span class="fly-list-hint">
                  <i class="iconfont" title="回答">
                    &#xe60c;
                  </i>
                  <?php echo $v['answer_num']; ?>
                  <i class="iconfont" title="人气">
                    &#xe60b;
                  </i>
                 <?php echo $v['view_num']; ?>
                </span>
              </p>
            </li>
        <?php endforeach; ?>
        <?php foreach ($main as $v) : ?>
              <li class="fly-list-li">
                <a href="{:U('home/userCenter/center',array('id'=>$v['uid']))}" class="fly-list-avatar">
                  <img src="<?php echo '__ROOT__/'.$v['face'] ?>" alt="<?php echo $v['nickname']; ?>">
                </a>
                <h2 class="fly-tip">
                  <a href="{:U('home/discuss/index',array('qid'=>$v['qid']))}">
                    <?php echo $v['title']; ?>
                  </a>
                  <?php if($v['level']==1): ?>
                     <span class="fly-tip-jing">
                        精华
                      </span>
                  <?php endif; ?>
                </h2>
                <p>
                  <span>
                    <a href="{:U('home/userCenter/center',array('id'=>$v['uid']))}">
                      <?php echo $v['nickname']; ?>
                    </a>
                  </span>
                  <span>
                    <?php echo Ctime($v['create_time']); ?>
                  </span>
                  <span>
                    <?php echo $v['cname']; ?>
                  </span>
                  <span class="fly-list-hint">
                    <i class="iconfont" title="回答">
                      &#xe60c;
                    </i>
                    <?php echo $v['answer_num']; ?>
                    <i class="iconfont" title="人气">
                      &#xe60b;
                    </i>
                    <?php echo $v['view_num']; ?>
                  </span>
                </p>
              </li>
            <?php endforeach; ?>
      </ul>
      <div style="text-align: center" class="page">
         <?php echo $pages; ?>
      </div>
    </div>
  </div>
</div>
   